package com.example.login.view

import android.os.Bundle

import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.launcher.ARouter
import com.example.base.app.RouterPath
import com.example.common.mvi.BaseMviActivity
import com.example.login.R
import com.example.login.databinding.ActivityOneLoginBinding
import com.luck.picture.lib.utils.ToastUtils
import com.tencent.mmkv.MMKV
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class OneLoginActivity : BaseMviActivity<ActivityOneLoginBinding>() {
    override fun getLayoutId(): Int = R.layout.activity_one_login

    override fun initViews() {

        mDataBinding.btnOneLogin.setOnClickListener {
            ARouter.getInstance().build(RouterPath.PATH_MAIN_ACTIVITY).navigation()
            ToastUtils.showToast(this,"登录成功")
            MMKV.defaultMMKV().encode("token","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMzk1NTY2Nzc4OCIsImV4cCI6MTc2MDQzNTM2Nn0.0U9HHPNyp47QysmJgysCERJMOTmO7t2TPwLH3-bQl7Q")
        }

    }

}